@extends('home/myhouse/layout')
@section('title','消息管理')
@section('content')
    <!-- Content Header (Page header) -->
<section class="content">
            <div class="row">
                <div class="col-md-3">
                    <a href="/home/myhouse/message/create" class="btn btn-primary btn-block margin-bottom">发消息</a>
                    <div class="box box-solid">
                        <div class="box-header with-border">
                            <h3 class="box-title">我的消息</h3>
                            <div class="box-tools">
                                <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                                </button>
                            </div>
                        </div>
                        <div class="box-body no-padding">
                            <ul class="nav nav-pills nav-stacked">
                                <li><a href="/home/myhouse/message"><i class="fa fa-inbox"></i> 新消息 <span
                                                class="label label-primary pull-right">12</span></a></li>
                                <li><a href="/home/myhouse/message/create"><i class="fa fa-envelope-o"></i> 发消息</a></li>
                                <li><a href="/home/myhouse/message/receive"><i class="fa fa-file-text-o"></i> 收件箱</a></li>
                                <li><a href="/home/myhouse/message/send"><i class="fa fa-filter"></i> 已发送 <span
                                                class="label label-warning pull-right">65</span></a></li>
                                <li><a href="/home/myhouse/message/delete"><i class="fa fa-trash-o"></i> 已删除</a></li>
                            </ul>
                        </div><!-- /.box-body -->
                    </div><!-- /. box -->
                </div><!-- /.col -->
                <div class="col-md-9">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">已删除</h3>
                            <div class="box-tools pull-right">
                                <div class="has-feedback">
                                </div>
                            </div><!-- /.box-tools -->
                        </div><!-- /.box-header -->
                    <div class="box box-primary">
                        <form action="/home/myhouse/message" method="get">
                            <div class="form-group">
                                <div class="row" >
                                    <div class="col-md-2">
                                        <select  name="num" class="form-control">
                                            <option
                                                    @if(!empty($request['num']) && $request['num'] == 3)
                                                    selected
                                                    @endif
                                            >3</option>
                                            <option
                                                    @if(!empty($request['num']) && $request['num'] == 6)
                                                    selected
                                                    @endif>6
                                            </option>
                                        </select>
                                    </div>
                                    <div class=" col-md-4 col-md-offset-6">
                                        <div class="input-group input-group-sm">
                                            <input type="text" value="{{$request['keywords'] or ''}}" name="keywords" class="form-control">
                                            <span class="input-group-btn">
                                              <button class="btn btn-info btn-flat" >搜索</button>
                                            </span>
                                        </div><!-- /input-group -->
                                    </div>
                                </div>
                            </div>
                        </form>
                            <div class="table-responsive mailbox-messages">
                                <table class="table table-hover table-striped">
                                    <tbody>
                                        @foreach($data as $ad)
                                            <tr>
                                                <td><input type="checkbox"></td>
                                                <td class="mailbox-star"><a href="/home/myhouse/message/{{$ad -> send_mem_id}}/edit/">
                                                        @if($ad->readed == 2)
                                                            <i class="fa fa-star text-yellow"></i>已读
                                                        @else
                                                            <i class="fa fa-paperclip">未读</i>
                                                        @endif
                                                    </a>
                                                </td>
                                                <td class="mailbox-name">
                                                    <a href="/home/myhouse/message/{{$ad -> receive_mem_id}}/edit/">
                                                        @if(true)
                                                            发：{{$ad->sname}}|收：
                                                        @endif
                                                        {{$ad->rname}}
                                                    </a>
                                                </td>
                                                <td class="mailbox-subject"><b>{{$ad->content}}</b>
                                                </td>
                                                <td class="mailbox-date">{{$ad->stime}}</td>
                                                <td class="mailbox-date">
                                                <a href="/home/myhouse/message/dodelete/{{$ad->time}}" style="color:red;">永久删除</a>
                                                </td>
                                            </tr>
                                        @endforeach
                                    </tbody>
                                </table><!-- /.table -->
                                {!! $data -> appends($request) -> render() !!}
                            </div><!-- /.mail-box-messages -->
                        </div><!-- /.box-body -->
                        <div class="box-footer no-padding">
                    </div><!-- /. box -->
                </div><!-- /.col -->
            </div><!-- /.row -->
</section><!-- /.content -->

@stop